Integrand size = 33, antiderivative size = 304 \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\frac {C x}{b^4}+\frac {a \left (a^2 b^4 (A-8 C)-2 a^6 C+7 a^4 b^2 C+4 b^6 (A+2 C)\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{7/2} b^4 (a+b)^{7/2} d}-\frac {\left (A b^2+a^2 C\right ) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}-\frac {a \left (2 A b^4-3 a^4 C+a^2 b^2 (3 A+8 C)\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {\left (4 A b^6+9 a^6 C+2 a^2 b^4 (7 A+17 C)-a^4 b^2 (3 A+28 C)\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))} \]
C*x/b^4+a*(a^2*b^4*(A-8*C)-2*a^6*C+7*a^4*b^2*C+4*b^6*(A+2*C))*arctan((a-b) ^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/(a-b)^(7/2)/b^4/(a+b)^(7/2)/d-1/3*( A*b^2+C*a^2)*cos(d*x+c)^2*sin(d*x+c)/b/(a^2-b^2)/d/(a+b*cos(d*x+c))^3-1/6* a*(2*A*b^4-3*a^4*C+a^2*b^2*(3*A+8*C))*sin(d*x+c)/b^3/(a^2-b^2)^2/d/(a+b*co s(d*x+c))^2-1/6*(4*A*b^6+9*a^6*C+2*a^2*b^4*(7*A+17*C)-a^4*b^2*(3*A+28*C))* sin(d*x+c)/b^3/(a^2-b^2)^3/d/(a+b*cos(d*x+c))
Leaf count is larger than twice the leaf count of optimal. \(723\) vs. \(2(304)=608\).
Time = 8.06 (sec) , antiderivative size = 723, normalized size of antiderivative = 2.38 \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=-\frac {\frac {24 a \left (-a^2 b^4 (A-8 C)+2 a^6 C-7 a^4 b^2 C-4 b^6 (A+2 C)\right ) \text {arctanh}\left (\frac {(a-b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2+b^2}}\right )}{\left (-a^2+b^2\right )^{7/2}}+\frac {-24 a^9 c C+36 a^7 b^2 c C+36 a^5 b^4 c C-84 a^3 b^6 c C+36 a b^8 c C-24 a^9 C d x+36 a^7 b^2 C d x+36 a^5 b^4 C d x-84 a^3 b^6 C d x+36 a b^8 C d x+18 b \left (-a^2+b^2\right )^3 \left (4 a^2+b^2\right ) C (c+d x) \cos (c+d x)-36 a b^2 \left (a^2-b^2\right )^3 C (c+d x) \cos (2 (c+d x))-6 a^6 b^3 c C \cos (3 (c+d x))+18 a^4 b^5 c C \cos (3 (c+d x))-18 a^2 b^7 c C \cos (3 (c+d x))+6 b^9 c C \cos (3 (c+d x))-6 a^6 b^3 C d x \cos (3 (c+d x))+18 a^4 b^5 C d x \cos (3 (c+d x))-18 a^2 b^7 C d x \cos (3 (c+d x))+6 b^9 C d x \cos (3 (c+d x))+51 a^4 A b^5 \sin (c+d x)+18 a^2 A b^7 \sin (c+d x)+6 A b^9 \sin (c+d x)+24 a^8 b C \sin (c+d x)-57 a^6 b^3 C \sin (c+d x)+72 a^4 b^5 C \sin (c+d x)+36 a^2 b^7 C \sin (c+d x)-6 a^5 A b^4 \sin (2 (c+d x))+54 a^3 A b^6 \sin (2 (c+d x))+12 a A b^8 \sin (2 (c+d x))+30 a^7 b^2 C \sin (2 (c+d x))-90 a^5 b^4 C \sin (2 (c+d x))+120 a^3 b^6 C \sin (2 (c+d x))-a^4 A b^5 \sin (3 (c+d x))+10 a^2 A b^7 \sin (3 (c+d x))+6 A b^9 \sin (3 (c+d x))+11 a^6 b^3 C \sin (3 (c+d x))-32 a^4 b^5 C \sin (3 (c+d x))+36 a^2 b^7 C \sin (3 (c+d x))}{\left (a^2-b^2\right )^3 (a+b \cos (c+d x))^3}}{24 b^4 d} \]
-1/24*((24*a*(-(a^2*b^4*(A - 8*C)) + 2*a^6*C - 7*a^4*b^2*C - 4*b^6*(A + 2* C))*ArcTanh[((a - b)*Tan[(c + d*x)/2])/Sqrt[-a^2 + b^2]])/(-a^2 + b^2)^(7/ 2) + (-24*a^9*c*C + 36*a^7*b^2*c*C + 36*a^5*b^4*c*C - 84*a^3*b^6*c*C + 36* a*b^8*c*C - 24*a^9*C*d*x + 36*a^7*b^2*C*d*x + 36*a^5*b^4*C*d*x - 84*a^3*b^ 6*C*d*x + 36*a*b^8*C*d*x + 18*b*(-a^2 + b^2)^3*(4*a^2 + b^2)*C*(c + d*x)*C os[c + d*x] - 36*a*b^2*(a^2 - b^2)^3*C*(c + d*x)*Cos[2*(c + d*x)] - 6*a^6* b^3*c*C*Cos[3*(c + d*x)] + 18*a^4*b^5*c*C*Cos[3*(c + d*x)] - 18*a^2*b^7*c* C*Cos[3*(c + d*x)] + 6*b^9*c*C*Cos[3*(c + d*x)] - 6*a^6*b^3*C*d*x*Cos[3*(c + d*x)] + 18*a^4*b^5*C*d*x*Cos[3*(c + d*x)] - 18*a^2*b^7*C*d*x*Cos[3*(c + d*x)] + 6*b^9*C*d*x*Cos[3*(c + d*x)] + 51*a^4*A*b^5*Sin[c + d*x] + 18*a^2 *A*b^7*Sin[c + d*x] + 6*A*b^9*Sin[c + d*x] + 24*a^8*b*C*Sin[c + d*x] - 57* a^6*b^3*C*Sin[c + d*x] + 72*a^4*b^5*C*Sin[c + d*x] + 36*a^2*b^7*C*Sin[c + d*x] - 6*a^5*A*b^4*Sin[2*(c + d*x)] + 54*a^3*A*b^6*Sin[2*(c + d*x)] + 12*a *A*b^8*Sin[2*(c + d*x)] + 30*a^7*b^2*C*Sin[2*(c + d*x)] - 90*a^5*b^4*C*Sin [2*(c + d*x)] + 120*a^3*b^6*C*Sin[2*(c + d*x)] - a^4*A*b^5*Sin[3*(c + d*x) ] + 10*a^2*A*b^7*Sin[3*(c + d*x)] + 6*A*b^9*Sin[3*(c + d*x)] + 11*a^6*b^3* C*Sin[3*(c + d*x)] - 32*a^4*b^5*C*Sin[3*(c + d*x)] + 36*a^2*b^7*C*Sin[3*(c + d*x)])/((a^2 - b^2)^3*(a + b*Cos[c + d*x])^3))/(b^4*d)
Time = 1.57 (sec) , antiderivative size = 361, normalized size of antiderivative = 1.19, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.394, Rules used = {3042, 3527, 3042, 3510, 25, 3042, 3500, 27, 3042, 3214, 3042, 3138, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^4}dx\) |
\(\Big \downarrow \) 3527 |
\(\displaystyle -\frac {\int \frac {\cos (c+d x) \left (-3 \left (a^2-b^2\right ) C \cos ^2(c+d x)-3 a b (A+C) \cos (c+d x)+2 \left (C a^2+A b^2\right )\right )}{(a+b \cos (c+d x))^3}dx}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right ) \left (-3 \left (a^2-b^2\right ) C \sin \left (c+d x+\frac {\pi }{2}\right )^2-3 a b (A+C) \sin \left (c+d x+\frac {\pi }{2}\right )+2 \left (C a^2+A b^2\right )\right )}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^3}dx}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}\) |
\(\Big \downarrow \) 3510 |
\(\displaystyle -\frac {\frac {\int -\frac {6 b \left (a^2-b^2\right )^2 C \cos ^2(c+d x)-a \left (3 C a^4-b^2 (3 A+10 C) a^2+4 b^4 (2 A+3 C)\right ) \cos (c+d x)+2 b \left (-3 C a^4+b^2 (3 A+8 C) a^2+2 A b^4\right )}{(a+b \cos (c+d x))^2}dx}{2 b^2 \left (a^2-b^2\right )}+\frac {a \left (-3 a^4 C+a^2 b^2 (3 A+8 C)+2 A b^4\right ) \sin (c+d x)}{2 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\frac {a \left (-3 a^4 C+a^2 b^2 (3 A+8 C)+2 A b^4\right ) \sin (c+d x)}{2 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac {\int \frac {6 b \left (a^2-b^2\right )^2 C \cos ^2(c+d x)-a \left (3 C a^4-b^2 (3 A+10 C) a^2+4 b^4 (2 A+3 C)\right ) \cos (c+d x)+2 b \left (-3 C a^4+b^2 (3 A+8 C) a^2+2 A b^4\right )}{(a+b \cos (c+d x))^2}dx}{2 b^2 \left (a^2-b^2\right )}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {a \left (-3 a^4 C+a^2 b^2 (3 A+8 C)+2 A b^4\right ) \sin (c+d x)}{2 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac {\int \frac {6 b \left (a^2-b^2\right )^2 C \sin \left (c+d x+\frac {\pi }{2}\right )^2-a \left (3 C a^4-b^2 (3 A+10 C) a^2+4 b^4 (2 A+3 C)\right ) \sin \left (c+d x+\frac {\pi }{2}\right )+2 b \left (-3 C a^4+b^2 (3 A+8 C) a^2+2 A b^4\right )}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx}{2 b^2 \left (a^2-b^2\right )}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}\) |
\(\Big \downarrow \) 3500 |
\(\displaystyle -\frac {\frac {a \left (-3 a^4 C+a^2 b^2 (3 A+8 C)+2 A b^4\right ) \sin (c+d x)}{2 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac {-\frac {\int -\frac {3 \left (2 b C \cos (c+d x) \left (a^2-b^2\right )^3+a b^2 \left (C a^4+b^2 (A-2 C) a^2+2 b^4 (2 A+3 C)\right )\right )}{a+b \cos (c+d x)}dx}{b \left (a^2-b^2\right )}-\frac {\left (9 a^6 C-a^4 b^2 (3 A+28 C)+2 a^2 b^4 (7 A+17 C)+4 A b^6\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b^2 \left (a^2-b^2\right )}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {\frac {a \left (-3 a^4 C+a^2 b^2 (3 A+8 C)+2 A b^4\right ) \sin (c+d x)}{2 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac {\frac {3 \int \frac {2 b C \cos (c+d x) \left (a^2-b^2\right )^3+a b^2 \left (C a^4+b^2 (A-2 C) a^2+2 b^4 (2 A+3 C)\right )}{a+b \cos (c+d x)}dx}{b \left (a^2-b^2\right )}-\frac {\left (9 a^6 C-a^4 b^2 (3 A+28 C)+2 a^2 b^4 (7 A+17 C)+4 A b^6\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b^2 \left (a^2-b^2\right )}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {a \left (-3 a^4 C+a^2 b^2 (3 A+8 C)+2 A b^4\right ) \sin (c+d x)}{2 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac {\frac {3 \int \frac {2 b C \sin \left (c+d x+\frac {\pi }{2}\right ) \left (a^2-b^2\right )^3+a b^2 \left (C a^4+b^2 (A-2 C) a^2+2 b^4 (2 A+3 C)\right )}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{b \left (a^2-b^2\right )}-\frac {\left (9 a^6 C-a^4 b^2 (3 A+28 C)+2 a^2 b^4 (7 A+17 C)+4 A b^6\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b^2 \left (a^2-b^2\right )}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle -\frac {\frac {a \left (-3 a^4 C+a^2 b^2 (3 A+8 C)+2 A b^4\right ) \sin (c+d x)}{2 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac {\frac {3 \left (a \left (-2 a^6 C+7 a^4 b^2 C+a^2 b^4 (A-8 C)+4 b^6 (A+2 C)\right ) \int \frac {1}{a+b \cos (c+d x)}dx+2 C x \left (a^2-b^2\right )^3\right )}{b \left (a^2-b^2\right )}-\frac {\left (9 a^6 C-a^4 b^2 (3 A+28 C)+2 a^2 b^4 (7 A+17 C)+4 A b^6\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b^2 \left (a^2-b^2\right )}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {a \left (-3 a^4 C+a^2 b^2 (3 A+8 C)+2 A b^4\right ) \sin (c+d x)}{2 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac {\frac {3 \left (a \left (-2 a^6 C+7 a^4 b^2 C+a^2 b^4 (A-8 C)+4 b^6 (A+2 C)\right ) \int \frac {1}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx+2 C x \left (a^2-b^2\right )^3\right )}{b \left (a^2-b^2\right )}-\frac {\left (9 a^6 C-a^4 b^2 (3 A+28 C)+2 a^2 b^4 (7 A+17 C)+4 A b^6\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b^2 \left (a^2-b^2\right )}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle -\frac {\frac {a \left (-3 a^4 C+a^2 b^2 (3 A+8 C)+2 A b^4\right ) \sin (c+d x)}{2 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac {\frac {3 \left (\frac {2 a \left (-2 a^6 C+7 a^4 b^2 C+a^2 b^4 (A-8 C)+4 b^6 (A+2 C)\right ) \int \frac {1}{(a-b) \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b}d\tan \left (\frac {1}{2} (c+d x)\right )}{d}+2 C x \left (a^2-b^2\right )^3\right )}{b \left (a^2-b^2\right )}-\frac {\left (9 a^6 C-a^4 b^2 (3 A+28 C)+2 a^2 b^4 (7 A+17 C)+4 A b^6\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b^2 \left (a^2-b^2\right )}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle -\frac {\left (a^2 C+A b^2\right ) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}-\frac {\frac {a \left (-3 a^4 C+a^2 b^2 (3 A+8 C)+2 A b^4\right ) \sin (c+d x)}{2 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac {\frac {3 \left (2 C x \left (a^2-b^2\right )^3+\frac {2 a \left (-2 a^6 C+7 a^4 b^2 C+a^2 b^4 (A-8 C)+4 b^6 (A+2 C)\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{d \sqrt {a-b} \sqrt {a+b}}\right )}{b \left (a^2-b^2\right )}-\frac {\left (9 a^6 C-a^4 b^2 (3 A+28 C)+2 a^2 b^4 (7 A+17 C)+4 A b^6\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b^2 \left (a^2-b^2\right )}}{3 b \left (a^2-b^2\right )}\) |
-1/3*((A*b^2 + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b *Cos[c + d*x])^3) - ((a*(2*A*b^4 - 3*a^4*C + a^2*b^2*(3*A + 8*C))*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - ((3*(2*(a^2 - b^2)^3* C*x + (2*a*(a^2*b^4*(A - 8*C) - 2*a^6*C + 7*a^4*b^2*C + 4*b^6*(A + 2*C))*A rcTan[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*Sqrt[a + b ]*d)))/(b*(a^2 - b^2)) - ((4*A*b^6 + 9*a^6*C + 2*a^2*b^4*(7*A + 17*C) - a^ 4*b^2*(3*A + 28*C))*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x])))/(2 *b^2*(a^2 - b^2)))/(3*b*(a^2 - b^2))
3.6.87.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1)* (a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x ])^(m + 1)*Simp[b*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A *b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f _.)*(x_)]^2), x_Symbol] :> Simp[(-(b*c - a*d))*(A*b^2 - a*b*B + a^2*C)*Cos[ e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b^2*f*(m + 1)*(a^2 - b^2))), x] - S imp[1/(b^2*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*( m + 1)*((b*B - a*C)*(b*c - a*d) - A*b*(a*c - b*d)) + (b*B*(a^2*d + b^2*d*(m + 1) - a*b*c*(m + 2)) + (b*c - a*d)*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1)) ))*Sin[e + f*x] - b*C*d*(m + 1)*(a^2 - b^2)*Sin[e + f*x]^2, x], x], x] /; F reeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(c^2*C + A*d^2))*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 - d^2))), x] + Simp[1/(d*(n + 1)*(c^2 - d^ 2)) Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^(n + 1)*Simp[A* d*(b*d*m + a*c*(n + 1)) + c*C*(b*c*m + a*d*(n + 1)) - (A*d*(a*d*(n + 2) - b *c*(n + 1)) - C*(b*c*d*(n + 1) - a*(c^2 + d^2*(n + 1))))*Sin[e + f*x] - b*( A*d^2*(m + n + 2) + C*(c^2*(m + 1) + d^2*(n + 1)))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 0] && LtQ[n, -1]
Time = 2.54 (sec) , antiderivative size = 479, normalized size of antiderivative = 1.58
method | result | size |
derivativedivides | \(\frac {\frac {\frac {2 \left (-\frac {\left (A \,a^{3} b^{3}+6 A \,a^{2} b^{4}+2 A a \,b^{5}+2 A \,b^{6}+2 C \,a^{6}-C \,a^{5} b -6 C \,a^{4} b^{2}+4 C \,a^{3} b^{3}+12 C \,a^{2} b^{4}\right ) b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {2 \left (7 A \,a^{2} b^{4}+3 A \,b^{6}+3 C \,a^{6}-11 C \,a^{4} b^{2}+18 C \,a^{2} b^{4}\right ) b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 \left (a^{2}+2 a b +b^{2}\right ) \left (a^{2}-2 a b +b^{2}\right )}+\frac {\left (A \,a^{3} b^{3}-6 A \,a^{2} b^{4}+2 A a \,b^{5}-2 A \,b^{6}-2 C \,a^{6}-C \,a^{5} b +6 C \,a^{4} b^{2}+4 C \,a^{3} b^{3}-12 C \,a^{2} b^{4}\right ) b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}\right )}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b \right )}^{3}}+\frac {a \left (A \,a^{2} b^{4}+4 A \,b^{6}-2 C \,a^{6}+7 C \,a^{4} b^{2}-8 C \,a^{2} b^{4}+8 C \,b^{6}\right ) \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}}{b^{4}}+\frac {2 C \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{4}}}{d}\) | \(479\) |
default | \(\frac {\frac {\frac {2 \left (-\frac {\left (A \,a^{3} b^{3}+6 A \,a^{2} b^{4}+2 A a \,b^{5}+2 A \,b^{6}+2 C \,a^{6}-C \,a^{5} b -6 C \,a^{4} b^{2}+4 C \,a^{3} b^{3}+12 C \,a^{2} b^{4}\right ) b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {2 \left (7 A \,a^{2} b^{4}+3 A \,b^{6}+3 C \,a^{6}-11 C \,a^{4} b^{2}+18 C \,a^{2} b^{4}\right ) b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 \left (a^{2}+2 a b +b^{2}\right ) \left (a^{2}-2 a b +b^{2}\right )}+\frac {\left (A \,a^{3} b^{3}-6 A \,a^{2} b^{4}+2 A a \,b^{5}-2 A \,b^{6}-2 C \,a^{6}-C \,a^{5} b +6 C \,a^{4} b^{2}+4 C \,a^{3} b^{3}-12 C \,a^{2} b^{4}\right ) b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}\right )}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b \right )}^{3}}+\frac {a \left (A \,a^{2} b^{4}+4 A \,b^{6}-2 C \,a^{6}+7 C \,a^{4} b^{2}-8 C \,a^{2} b^{4}+8 C \,b^{6}\right ) \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}}{b^{4}}+\frac {2 C \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{4}}}{d}\) | \(479\) |
risch | \(\text {Expression too large to display}\) | \(1753\) |
1/d*(2/b^4*((-1/2*(A*a^3*b^3+6*A*a^2*b^4+2*A*a*b^5+2*A*b^6+2*C*a^6-C*a^5*b -6*C*a^4*b^2+4*C*a^3*b^3+12*C*a^2*b^4)*b/(a-b)/(a^3+3*a^2*b+3*a*b^2+b^3)*t an(1/2*d*x+1/2*c)^5-2/3*(7*A*a^2*b^4+3*A*b^6+3*C*a^6-11*C*a^4*b^2+18*C*a^2 *b^4)*b/(a^2+2*a*b+b^2)/(a^2-2*a*b+b^2)*tan(1/2*d*x+1/2*c)^3+1/2*(A*a^3*b^ 3-6*A*a^2*b^4+2*A*a*b^5-2*A*b^6-2*C*a^6-C*a^5*b+6*C*a^4*b^2+4*C*a^3*b^3-12 *C*a^2*b^4)*b/(a+b)/(a^3-3*a^2*b+3*a*b^2-b^3)*tan(1/2*d*x+1/2*c))/(tan(1/2 *d*x+1/2*c)^2*a-b*tan(1/2*d*x+1/2*c)^2+a+b)^3+1/2*a*(A*a^2*b^4+4*A*b^6-2*C *a^6+7*C*a^4*b^2-8*C*a^2*b^4+8*C*b^6)/(a^6-3*a^4*b^2+3*a^2*b^4-b^6)/((a-b) *(a+b))^(1/2)*arctan((a-b)*tan(1/2*d*x+1/2*c)/((a-b)*(a+b))^(1/2)))+2*C/b^ 4*arctan(tan(1/2*d*x+1/2*c)))
Leaf count of result is larger than twice the leaf count of optimal. 833 vs. \(2 (292) = 584\).
Time = 0.42 (sec) , antiderivative size = 1735, normalized size of antiderivative = 5.71 \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\text {Too large to display} \]
[1/12*(12*(C*a^8*b^3 - 4*C*a^6*b^5 + 6*C*a^4*b^7 - 4*C*a^2*b^9 + C*b^11)*d *x*cos(d*x + c)^3 + 36*(C*a^9*b^2 - 4*C*a^7*b^4 + 6*C*a^5*b^6 - 4*C*a^3*b^ 8 + C*a*b^10)*d*x*cos(d*x + c)^2 + 36*(C*a^10*b - 4*C*a^8*b^3 + 6*C*a^6*b^ 5 - 4*C*a^4*b^7 + C*a^2*b^9)*d*x*cos(d*x + c) + 12*(C*a^11 - 4*C*a^9*b^2 + 6*C*a^7*b^4 - 4*C*a^5*b^6 + C*a^3*b^8)*d*x - 3*(2*C*a^10 - 7*C*a^8*b^2 - (A - 8*C)*a^6*b^4 - 4*(A + 2*C)*a^4*b^6 + (2*C*a^7*b^3 - 7*C*a^5*b^5 - (A - 8*C)*a^3*b^7 - 4*(A + 2*C)*a*b^9)*cos(d*x + c)^3 + 3*(2*C*a^8*b^2 - 7*C* a^6*b^4 - (A - 8*C)*a^4*b^6 - 4*(A + 2*C)*a^2*b^8)*cos(d*x + c)^2 + 3*(2*C *a^9*b - 7*C*a^7*b^3 - (A - 8*C)*a^5*b^5 - 4*(A + 2*C)*a^3*b^7)*cos(d*x + c))*sqrt(-a^2 + b^2)*log((2*a*b*cos(d*x + c) + (2*a^2 - b^2)*cos(d*x + c)^ 2 - 2*sqrt(-a^2 + b^2)*(a*cos(d*x + c) + b)*sin(d*x + c) - a^2 + 2*b^2)/(b ^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + a^2)) - 2*(6*C*a^10*b - 23*C*a^8* b^3 + (13*A + 43*C)*a^6*b^5 - (11*A + 26*C)*a^4*b^7 - 2*A*a^2*b^9 + (11*C* a^8*b^3 - (A + 43*C)*a^6*b^5 + (11*A + 68*C)*a^4*b^7 - 4*(A + 9*C)*a^2*b^9 - 6*A*b^11)*cos(d*x + c)^2 + 3*(5*C*a^9*b^2 - (A + 20*C)*a^7*b^4 + 5*(2*A + 7*C)*a^5*b^6 - (7*A + 20*C)*a^3*b^8 - 2*A*a*b^10)*cos(d*x + c))*sin(d*x + c))/((a^8*b^7 - 4*a^6*b^9 + 6*a^4*b^11 - 4*a^2*b^13 + b^15)*d*cos(d*x + c)^3 + 3*(a^9*b^6 - 4*a^7*b^8 + 6*a^5*b^10 - 4*a^3*b^12 + a*b^14)*d*cos(d *x + c)^2 + 3*(a^10*b^5 - 4*a^8*b^7 + 6*a^6*b^9 - 4*a^4*b^11 + a^2*b^13)*d *cos(d*x + c) + (a^11*b^4 - 4*a^9*b^6 + 6*a^7*b^8 - 4*a^5*b^10 + a^3*b^...
Timed out. \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 845 vs. \(2 (292) = 584\).
Time = 0.35 (sec) , antiderivative size = 845, normalized size of antiderivative = 2.78 \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\text {Too large to display} \]
1/3*(3*(2*C*a^7 - 7*C*a^5*b^2 - A*a^3*b^4 + 8*C*a^3*b^4 - 4*A*a*b^6 - 8*C* a*b^6)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan( 1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(a^2 - b^2)))/((a^6*b^4 - 3 *a^4*b^6 + 3*a^2*b^8 - b^10)*sqrt(a^2 - b^2)) + 3*(d*x + c)*C/b^4 - (6*C*a ^8*tan(1/2*d*x + 1/2*c)^5 - 15*C*a^7*b*tan(1/2*d*x + 1/2*c)^5 - 6*C*a^6*b^ 2*tan(1/2*d*x + 1/2*c)^5 + 3*A*a^5*b^3*tan(1/2*d*x + 1/2*c)^5 + 45*C*a^5*b ^3*tan(1/2*d*x + 1/2*c)^5 + 12*A*a^4*b^4*tan(1/2*d*x + 1/2*c)^5 - 6*C*a^4* b^4*tan(1/2*d*x + 1/2*c)^5 - 27*A*a^3*b^5*tan(1/2*d*x + 1/2*c)^5 - 60*C*a^ 3*b^5*tan(1/2*d*x + 1/2*c)^5 + 12*A*a^2*b^6*tan(1/2*d*x + 1/2*c)^5 + 36*C* a^2*b^6*tan(1/2*d*x + 1/2*c)^5 - 6*A*a*b^7*tan(1/2*d*x + 1/2*c)^5 + 6*A*b^ 8*tan(1/2*d*x + 1/2*c)^5 + 12*C*a^8*tan(1/2*d*x + 1/2*c)^3 - 56*C*a^6*b^2* tan(1/2*d*x + 1/2*c)^3 + 28*A*a^4*b^4*tan(1/2*d*x + 1/2*c)^3 + 116*C*a^4*b ^4*tan(1/2*d*x + 1/2*c)^3 - 16*A*a^2*b^6*tan(1/2*d*x + 1/2*c)^3 - 72*C*a^2 *b^6*tan(1/2*d*x + 1/2*c)^3 - 12*A*b^8*tan(1/2*d*x + 1/2*c)^3 + 6*C*a^8*ta n(1/2*d*x + 1/2*c) + 15*C*a^7*b*tan(1/2*d*x + 1/2*c) - 6*C*a^6*b^2*tan(1/2 *d*x + 1/2*c) - 3*A*a^5*b^3*tan(1/2*d*x + 1/2*c) - 45*C*a^5*b^3*tan(1/2*d* x + 1/2*c) + 12*A*a^4*b^4*tan(1/2*d*x + 1/2*c) - 6*C*a^4*b^4*tan(1/2*d*x + 1/2*c) + 27*A*a^3*b^5*tan(1/2*d*x + 1/2*c) + 60*C*a^3*b^5*tan(1/2*d*x + 1 /2*c) + 12*A*a^2*b^6*tan(1/2*d*x + 1/2*c) + 36*C*a^2*b^6*tan(1/2*d*x + 1/2 *c) + 6*A*a*b^7*tan(1/2*d*x + 1/2*c) + 6*A*b^8*tan(1/2*d*x + 1/2*c))/((...
Time = 17.36 (sec) , antiderivative size = 9774, normalized size of antiderivative = 32.15 \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\text {Too large to display} \]
(2*C*atan(((C*((8*tan(c/2 + (d*x)/2)*(8*C^2*a^14 + 4*C^2*b^14 - 8*C^2*a*b^ 13 - 8*C^2*a^13*b + 16*A^2*a^2*b^12 + 8*A^2*a^4*b^10 + A^2*a^6*b^8 + 44*C^ 2*a^2*b^12 + 48*C^2*a^3*b^11 - 92*C^2*a^4*b^10 - 120*C^2*a^5*b^9 + 156*C^2 *a^6*b^8 + 160*C^2*a^7*b^7 - 164*C^2*a^8*b^6 - 120*C^2*a^9*b^5 + 117*C^2*a ^10*b^4 + 48*C^2*a^11*b^3 - 48*C^2*a^12*b^2 + 64*A*C*a^2*b^12 - 48*A*C*a^4 *b^10 + 40*A*C*a^6*b^8 - 2*A*C*a^8*b^6 - 4*A*C*a^10*b^4))/(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10*a^ 7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6) + (C*((8*(4*C*b^21 + 8*A*a^2*b^19 + 22*A*a^3*b^18 - 22*A*a^4*b^17 - 18*A*a^5*b^16 + 18*A*a^6*b ^15 + 2*A*a^7*b^14 - 2*A*a^8*b^13 + 2*A*a^9*b^12 - 2*A*a^10*b^11 - 12*C*a^ 2*b^19 + 64*C*a^3*b^18 + 20*C*a^4*b^17 - 110*C*a^5*b^16 - 30*C*a^6*b^15 + 110*C*a^7*b^14 + 30*C*a^8*b^13 - 70*C*a^9*b^12 - 14*C*a^10*b^11 + 26*C*a^1 1*b^10 + 2*C*a^12*b^9 - 4*C*a^13*b^8 - 8*A*a*b^20 - 16*C*a*b^20))/(a*b^19 + b^20 - 5*a^2*b^18 - 5*a^3*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*a^7*b^13 + 5*a^8*b^12 + 5*a^9*b^11 - a^10*b^10 - a^11*b^9) - (C*tan( c/2 + (d*x)/2)*(8*a*b^21 - 8*a^2*b^20 - 48*a^3*b^19 + 48*a^4*b^18 + 120*a^ 5*b^17 - 120*a^6*b^16 - 160*a^7*b^15 + 160*a^8*b^14 + 120*a^9*b^13 - 120*a ^10*b^12 - 48*a^11*b^11 + 48*a^12*b^10 + 8*a^13*b^9 - 8*a^14*b^8)*8i)/(b^4 *(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10 *a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6))...